projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c904efe
)
stylechange: Do the right thing when old and new style are equal
author
Benjamin Otte
<otte@redhat.com>
Sat, 16 Jan 2016 22:15:11 +0000
(23:15 +0100)
committer
Benjamin Otte
<otte@redhat.com>
Sat, 16 Jan 2016 22:58:37 +0000
(23:58 +0100)
We don't need to compare all their CSS values to figure out that nothing
changed. We know that.
gtk/gtkcssstylechange.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssstylechange.c
b/gtk/gtkcssstylechange.c
index 50eac153e18c2a216968868898a78e4759aa5493..0ce6120f300479cd7c3bc967db564ca9283b0e04 100644
(file)
--- a/
gtk/gtkcssstylechange.c
+++ b/
gtk/gtkcssstylechange.c
@@
-33,6
+33,10
@@
gtk_css_style_change_init (GtkCssStyleChange *change,
change->affects = 0;
change->changes = _gtk_bitmask_new ();
+
+ /* Make sure we don't do extra work if old and new are equal. */
+ if (old_style == new_style)
+ change->n_compared = GTK_CSS_PROPERTY_N_PROPERTIES;
}
void